CONFIG_MODULE_SIG=n

ifneq ($(KERNELRELEASE),)
	mymodules-objs := led.o

obj-m := led.o

else

KVER ?= $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build

#specify flags for the module compilation
EXTRA_CFLAGS=-g -O0

CC = $(CROSS_COMPILE)gcc
MAKE =make
PWD := $(shell pwd)
#Note:SRC below should point to your kernel source directory
#SRC =/home/work/kernel/linux-xlnx
SRC = /home/projects/linux-xlnx

obj-m += led.o

all :
	@$(MAKE) -C $(SRC) M=$(PWD) modules #make drivers that can run on zedboard
	@#$(MAKE) -C /lib/modules/$(KVER)/build M=$(PWD) modules #make modules that can run on ubuntu
clean:
				rm -rf *.o *.ko *.mod.* *.symvers *.order
endif
